package zhaolongli_Boundary;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;

public class EdgeWarning extends JDialog {

	private final JPanel contentPanel = new JPanel();


	public EdgeWarning() {
		setAlwaysOnTop(true);
		setModal(true);
		setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		setBounds(320, 300, 450, 150);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		contentPanel.setLayout(null);

		
		JLabel lblPleaseEnterAll = new JLabel("Please Enter All the Choices in the text Field");
		lblPleaseEnterAll.setBounds(98, 31, 310, 16);
		contentPanel.add(lblPleaseEnterAll);
		
		JLabel lblBeforeAddingAn = new JLabel("Before adding an new Edge.");
		lblBeforeAddingAn.setBounds(98, 44, 286, 16);
		contentPanel.add(lblBeforeAddingAn);
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon(EdgeWarning.class.getResource("/com/sun/java/swing/plaf/windows/icons/Error.gif")));
		label.setBounds(55, 30, 31, 33);
		contentPanel.add(label);
		
		JButton btnOk = new JButton("OK");
		btnOk.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				EdgeWarning.this.dispose();
			}
		});
		btnOk.setBounds(164, 82, 117, 29);
		contentPanel.add(btnOk);
		
		JLabel lblrememberToHit = new JLabel("(Remember to hit ENTER everytime you Enter a choice)");
		lblrememberToHit.setFont(new Font("Lucida Grande", Font.PLAIN, 11));
		lblrememberToHit.setBounds(98, 59, 332, 16);
		contentPanel.add(lblrememberToHit);

		setVisible(true);
		
	}
}
